package com.saturday.uid.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(
        prefix = "saturday.uid.zk"
)
@Data
public class ZookeeperProperties {

    /**
     * zookeeper地址
     */
    private String address = "127.0.0.1";

    /**
     * session超时时间
     */
    private Integer sessionTimeout = 3000;

    /**
     * 连接超时时间
     */
    private Integer connectionTimeout = 30000;

    /**
     * 一次性的workerId存放节点根目录
     */
    private String disposableUidRoot = "/disposable_uid";

    /**
     * 可复用的workerId存放节点根目录
     */
    private String repeatableUidRoot = "/repeatable_uid";

}
